package com.mocha.bss.domain.rbac.config;


import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Properties;

@ConfigurationProperties(MochaNacosProperties.PREFIX)
@Getter
@Setter
public class MochaNacosProperties {

    public static final String PREFIX = "spring.cloud.nacos.config";

    private String username;

    private String password;

    private String namespace;

    private String serverAddr;


    public Properties buildNacosProperties(){
        Properties properties = new Properties();
        properties.setProperty("serverAddr", serverAddr);
        properties.setProperty("namespace", namespace);
        properties.setProperty("username", username);
        properties.setProperty("password", password);
        return properties;
    }

}
